<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>

    div{
        margin-top: 10%;
        margin-left: 35%;
        width: 300px;
        padding-left: 2%;
        border: 3px dashed black;

    }
</style>
<body>
    <div>
    <form /*action="跳转后页面.html"*/>
        <p>账号：<input id= "username"></p>
        <p>密码：<input id= "password" type="password"></p>
        <p>性别：
            <input type="radio" name="sex"> 男
            <input type="radio" name="sex"> 女
        </p>
        <p>学历：
            <input type="radio" name="education"> 本科
            <input type="radio" name="education"> 大专
        </p>
        <p>自我介绍：
            <textarea id="show"></textarea>
        </p>
        <p align="center">
            <input type="submit" value="登录" onclick="return login()">
        </p>
    </div>
    </form>

    <Script>
        function login(){
            if(document.getElementById("password").value=="") {
                alert("请输入账号密码！");
                return false;
            }else if (document.getElementById("username").value === "admin" ){
                alert(document.getElementById("show").value)

                return true;
            } else{
                alert("用户名错误，登录失败");
                return false;
            }
        }
    </Script>
    
</body>
</html>